import request from '@/utils/request'
// 获取员工基本列表
export function getEmployeesimpleList() {
  return request({
    url: '/sys/user/simple'
  })
}
// 获取员工列表
export function getAllemployeeList(params) {
  return request({
    url: '/sys/user',
    params
  })
}
// 新增员工
export function addEmployee(data) {
  return request({
    url: '/sys/user',
    method: 'post',
    data
  })
}

// 批量导入员工
export const importEmployee = (data) => request({
  url: '/sys/user/batch',
  method: 'post',
  data })

// 保存员工所有信息
export const saveEmployeeAllInfo = (data) => request({
  url: `/employees/${data.id}/personalInfo`,
  method: 'PUT',
  data })

// 获取员工岗位信息
export const getEmployeeStateInfo = id => request({
  url: `/employees/${id}/jobs`
})

// 更新岗位信息
export const saveEmployeeJob = data => request({
  url: `/employees/${data.id}/jobs`,
  method: 'put',
  data
})

